﻿using DTcms.BLL;
using DTcms.Common;
using System.Collections.Generic;
using System.Data;
using Model = DTcms.Model;
using BLL = DTcms.BLL;
using DTcms.Web.Mvc.UI;

namespace System.Web.Mvc.Html
{
    public static class HtmlHelperComment
    {
        public static BaseController _base = new BaseController();

        /// <summary>
        /// 评论数据总数
        /// </summary>
        /// <param name="article_id">主表ID</param>
        /// <param name="strwhere">查询条件</param>
        /// <returns>Int</returns>
        public static int get_comment_count(this HtmlHelper htmlHelper, int channel_id, int article_id, string strwhere)
        {
            return _base.get_comment_count(channel_id, article_id, strwhere);
        }

        /// <summary>
        /// 评论分页列表
        /// </summary>
        /// <param name="page_size">页面大小</param>
        /// <param name="page_index">当前页码</param>
        /// <param name="strwhere">查询条件</param>
        /// <param name="totalcount">总记录数</param>
        /// <returns>List</returns>
        public static List<Model.article_comment> get_comment_list(this HtmlHelper htmlHelper, int page_size, int page_index, string strwhere, string filedOrder, out int totalcount)
        {
            return _base.get_comment_list(page_size, page_index, strwhere, filedOrder, out totalcount);
        }

        /// <summary>
        /// 评论列表
        /// </summary>
        /// <param name="top">显示条数</param>
        /// <param name="strwhere">查询条件</param>
        /// <returns>DateTable</returns>
        public static DataTable get_comment_list(this HtmlHelper htmlHelper, int top, string strwhere)
        {
            return _base.get_comment_list(top, strwhere);
        }
    }
}
